/*
 * LaTeXSettingsDialog.java
 *
 * Created on 17. Oktober 2008, 17:41
 */
package jcrypter.password;

import java.util.ResourceBundle;

/**
 *
 * @author  uli
 */
public class LaTeXSettingsDialog extends javax.swing.JDialog
{

    /** Creates new form LaTeXSettingsDialog
     * @param parent
     * @param modal 
     */
    public LaTeXSettingsDialog(java.awt.Frame parent, boolean modal)
    {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        enumMarkupLabel = new javax.swing.JLabel();
        passwordMarkupLabel = new javax.swing.JLabel();
        documentclassLabel = new javax.swing.JLabel();
        enumMarkupField = new javax.swing.JTextField();
        passwordMarkupField = new javax.swing.JTextField();
        okButton = new javax.swing.JButton();
        documentclassField = new javax.swing.JTextField();
        columnsDirectiveField = new javax.swing.JTextField();
        columnsDirectiveLabel = new javax.swing.JLabel();
        additionalDirectives = new javax.swing.JLabel();
        addDirectivesField = new javax.swing.JTextField();

        setTitle(i18n.getString("LaTeXSettingsDialog.title")); // NOI18N

        enumMarkupLabel.setText(i18n.getString("LaTeXSettingsDialog.enumMarkupLabel.text")); // NOI18N

        passwordMarkupLabel.setText(i18n.getString("LaTeXSettingsDialog.passwordMarkupLabel.text")); // NOI18N

        documentclassLabel.setText(i18n.getString("LaTeXSettingsDialog.documentclassLabel.text")); // NOI18N

        enumMarkupField.setText(i18n.getString("LaTeXSettingsDialog.enumMarkupField.text")); // NOI18N

        passwordMarkupField.setText(i18n.getString("LaTeXSettingsDialog.passwordMarkupField.text")); // NOI18N

        okButton.setText(i18n.getString("LaTeXSettingsDialog.okButton.text")); // NOI18N
        okButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                okButtonMouseClicked(evt);
            }
        });

        documentclassField.setText(i18n.getString("LaTeXSettingsDialog.documentclassField.text")); // NOI18N

        columnsDirectiveField.setText(i18n.getString("LaTeXSettingsDialog.columnsDirectiveField.text")); // NOI18N

        columnsDirectiveLabel.setText(i18n.getString("LaTeXSettingsDialog.columnsDirectiveLabel.text")); // NOI18N

        additionalDirectives.setText(i18n.getString("LaTeXSettingsDialog.additionalDirectives.text")); // NOI18N

        addDirectivesField.setText(i18n.getString("LaTeXSettingsDialog.addDirectivesField.text")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(documentclassLabel)
                            .addComponent(enumMarkupLabel)
                            .addComponent(passwordMarkupLabel)
                            .addComponent(columnsDirectiveLabel))
                        .addGap(24, 24, 24)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(enumMarkupField, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE)
                            .addComponent(passwordMarkupField, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE)
                            .addComponent(documentclassField, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE)
                            .addComponent(columnsDirectiveField, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(additionalDirectives)
                        .addGap(63, 63, 63)
                        .addComponent(addDirectivesField, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))
                    .addComponent(okButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(enumMarkupLabel)
                    .addComponent(enumMarkupField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(passwordMarkupLabel)
                    .addComponent(passwordMarkupField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(documentclassLabel)
                    .addComponent(documentclassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(columnsDirectiveLabel)
                    .addComponent(columnsDirectiveField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(additionalDirectives)
                    .addComponent(addDirectivesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(okButton)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void okButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_okButtonMouseClicked
    this.setVisible(false);
}//GEN-LAST:event_okButtonMouseClicked
//replaceAll("\\\\", "\\\\\\\\");
    public String getEnumMarkup()
    {
        return enumMarkupField.getText();
    }

    public String getPasswordMarkup()
    {
        return passwordMarkupField.getText();
    }

    public String getDocumentclassDirective()
    {
        return documentclassField.getText();
    }

    public String getMulticolDirective()
    {
        return columnsDirectiveField.getText();
    }

    public String getAdditionalDirectives()
    {
        return addDirectivesField.getText();
    }
    private ResourceBundle i18n =
            ResourceBundle.getBundle("jcrypter/password/Bundle");
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField addDirectivesField;
    private javax.swing.JLabel additionalDirectives;
    private javax.swing.JTextField columnsDirectiveField;
    private javax.swing.JLabel columnsDirectiveLabel;
    private javax.swing.JTextField documentclassField;
    private javax.swing.JLabel documentclassLabel;
    private javax.swing.JTextField enumMarkupField;
    private javax.swing.JLabel enumMarkupLabel;
    private javax.swing.JButton okButton;
    private javax.swing.JTextField passwordMarkupField;
    private javax.swing.JLabel passwordMarkupLabel;
    // End of variables declaration//GEN-END:variables
}
